
package com.caration.shell.preference;

import android.content.Intent;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

import com.caration.shell.Home;
import com.caration.shell.cr3d.SharedData;

public class SettingGesturePreferenceActivity extends PreferenceActivity implements
        OnPreferenceClickListener {
//    private HashMap a;
//    private HashMap b;
//    private int c;
//
//    public SettingGesturePreferenceActivity() {
//        a = new HashMap();
//        c = 5000;
//    }
//
//    private String a(int i1) {
//        String s = (String) b.get(Integer.valueOf(i1));
//        if (s == null)
//            s = "";
//        return s;
//    }
//
    public static void startup() {
        Intent intent = new Intent();
        intent.setClass(SharedData.getContext(), SettingGesturePreferenceActivity.class);
        int ai[] = new int[8];
        ai[1] = 1;
        ai[2] = 2;
        ai[3] = 3;
        ai[4] = 4;
        ai[5] = 5;
        ai[6] = 100;
        ai[7] = 101;
        int i1 = ai.length;
        String as[] = new String[ai.length];
        for (int j1 = 0; j1 < i1; j1++)
//            as[j1] = com.tsf.shell.action.c.a(ai[j1]).b;

        intent.putExtra("idList", ai);
        intent.putExtra("stringList", as);
        Home.getInstance().startActivity(intent);
    }
//
//    static void a(SettingGesturePreferenceActivity settinggesturepreferenceactivity, int i1,
//            String s, String s1) {
//        Intent intent = new Intent("com.tsf.shell.SET_ACTION");
//        intent.putExtra("gesture_action", i1);
//        intent.putExtra("gesture_name", s);
//        intent.putExtra("gesture_url", s1);
//        settinggesturepreferenceactivity.sendBroadcast(intent);
//    }
//
//    public final int a(Intent intent, com.tsf.shell.a a1) {
//        int i1 = c;
//        a.put(Integer.valueOf(c), a1);
//        int j1 = c;
//        try {
//            startActivityForResult(intent, j1);
//        } catch (Exception _ex) {
//            l l1 = new l(this);
//            com.censivn.C3DEngine.a.a();
//            w.a(l1);
//        }
//        overridePendingTransition(0x7f040000, 0x7f040001);
//        c = 1 + c;
//        return i1;
//    }
//
//    protected void onActivityResult(int i1, int j1, Intent intent) {
//        if (a.containsKey(Integer.valueOf(i1))) {
//            ((com.tsf.shell.a) a.get(Integer.valueOf(i1))).a(i1, j1, intent);
//            a.remove(Integer.valueOf(i1));
//        }
//    }
//
//    public void onCreate(Bundle bundle) {
//        super.onCreate(bundle);
//        addPreferencesFromResource(0x7f050002);
//        b = new HashMap();
//        String as[] = getIntent().getStringArrayExtra("stringList");
//        int ai[] = getIntent().getIntArrayExtra("idList");
//        int j1 = ai.length;
//        for (int i1 = 0; i1 < j1; i1++)
//            b.put(Integer.valueOf(ai[i1]), as[i1]);
//
//        findPreference("back_key_action").setOnPreferenceClickListener(this);
//        findPreference("back_key_action").setSummary(a(100));
//        findPreference("home_key_action").setOnPreferenceClickListener(this);
//        findPreference("home_key_action").setSummary(a(101));
//        findPreference("gesture_pinch_in").setOnPreferenceClickListener(this);
//        findPreference("gesture_pinch_in").setSummary(a(0));
//        findPreference("gesture_pinch_out").setOnPreferenceClickListener(this);
//        findPreference("gesture_pinch_out").setSummary(a(1));
//        findPreference("gesture_two_up").setOnPreferenceClickListener(this);
//        findPreference("gesture_two_up").setSummary(a(2));
//        findPreference("gesture_two_down").setOnPreferenceClickListener(this);
//        findPreference("gesture_two_down").setSummary(a(3));
//        findPreference("gesture_two_left").setOnPreferenceClickListener(this);
//        findPreference("gesture_two_left").setSummary(a(4));
//        findPreference("gesture_two_right").setOnPreferenceClickListener(this);
//        findPreference("gesture_two_right").setSummary(a(5));
//        i.a(this);
//    }
//
//    public void onDestroy() {
//        try {
//            System.exit(0);
//        } catch (Exception _ex) {
//        }
//        i.a();
//        super.onDestroy();
//    }
//
    public boolean onPreferenceClick(Preference preference) {
//        if ("back_key_action".equals(preference.getKey())) {
//            new d(this, this, this);
//        } else if ("home_key_action".equals(preference.getKey())) {
//            new e(this, this, this);
//        } else if ("gesture_pinch_in".equals(preference.getKey())) {
//            new f(this, this, this);
//        } else if ("gesture_pinch_out".equals(preference.getKey())) {
//            new g(this, this, this);
//        } else if ("gesture_two_up".equals(preference.getKey())) {
//            new com.tsf.shell.more.h(this, this, this);
//        } else if ("gesture_two_down".equals(preference.getKey())) {
//            new com.tsf.shell.more.i(this, this, this);
//        } else if ("gesture_two_left".equals(preference.getKey())) {
//            new j(this, this, this);
//        } else if ("gesture_two_right".equals(preference.getKey())) {
//            new k(this, this, this);
//        }
        return true;
    }
}
